// 生命store
import {defineStore} from 'pinia';

export const leftMenuStore = defineStore('leftMenu', {
    // state
    state: () => ({
        hide: false
    }),
    getters: {
        isCollapse({ hide }) {
            return hide
        },
        leftWidth({ hide }) {
            return hide ?  '64px' : '240px'
        }
    },
    actions: {
        open() {
            this.hide = !this.hide
        }
    }
})
